import java.util.ArrayList;
import java.util.Scanner;

public class Java007 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int number = sc.nextInt();
        fun(number);
    }
    public static void fun(int number){
        Integer num =0;
        ArrayList<Integer> arr = new ArrayList<Integer>();
        while(number>0){
            arr.add(number%2);
            number/=2;
        }
        for(int i=arr.size()-1;i>=0;i--){
            num = arr.get(i)+num*10;
//            arr.remove(i);
        }
        System.out.println(num);
    }
}
//十进制转二进制